#ifndef linear_list_h
#define linear_list_h

#define MAXSIZE 20

typedef int (*List_traverse_cb)(int *);

typedef struct
{
    int data[MAXSIZE];
    int length;
} SqList;

SqList *InitList();
void DestroyList(SqList *L);
//void ClearList(SqList *L, myfunc cell_method);
int ListEmpty(SqList *L);
int ListLength(SqList *L);
int GetElem(SqList *L, int i, int *e);
int LocateElem(SqList *L, int e);
int ListInsert(SqList *L, int i, int e);
int ListDelete(SqList *L, int i, int *e);
int ListTraverse(SqList *L, List_traverse_cb traverse_cb);

#endif